package upload

import (
	"dcs/db"
	"dcs/model"
)

var (
	Url        string
	Factory_no string
)

func init() {

	rows, err := db.GormDb.Table("base_sys").Select("key_name, key_type, key_value").Rows()
	if err != nil {
		panic(err)
		return
	}

	var sys_conf model.Base_sys
	for rows.Next() {
		db.GormDb.ScanRows(rows, &sys_conf)
		if sys_conf.Key_name == "url" {
			Url = sys_conf.Key_value
		}
		if sys_conf.Key_name == "factory_no" {
			Factory_no = sys_conf.Key_value
		}
	}
}
